fix: URL Path Parameter Encoding Issue#1516
Open
matheusandre1 wants to merge 2 commits intoquarkiverse:mainfrom
Open
fix: URL Path Parameter Encoding Issue#1516matheusandre1 wants to merge 2 commits intoquarkiverse:mainfrom
matheusandre1 wants to merge 2 commits intoquarkiverse:mainfrom
Conversation
.../io/quarkiverse/openapi/generator/providers/PathParamEncodingParamConverterProviderTest.java
Fixed
Show fixed
Hide fixed
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a MicroProfile REST client provider and annotation to ensure generated client path parameters are percent-encoded correctly (without double-encoding already-encoded %XX sequences), addressing the URL path parameter encoding issue (Closes #1460).
Changes:
- Introduces
@EncodedPathParamand aParamConverterProviderto encode path parameter values while preserving existing percent-escapes. - Updates MicroProfile templates to register the provider and mark generated
@PathParamparameters for encoding. - Adds runtime and deployment tests to validate encoding behavior and generator output.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| client/runtime/src/main/java/io/quarkiverse/openapi/generator/providers/PathParamEncodingParamConverterProvider.java | Adds the JAX-RS ParamConverterProvider implementing “encode but don’t double-encode” behavior. |
| client/runtime/src/main/java/io/quarkiverse/openapi/generator/annotations/EncodedPathParam.java | Adds marker annotation used to opt-in path param encoding for generated clients. |
| client/runtime/src/test/java/io/quarkiverse/openapi/generator/providers/PathParamEncodingParamConverterProviderTest.java | Adds unit tests for encoding + instance reuse behavior. |
| client/deployment/src/main/resources/templates/libraries/microprofile/api.qute | Registers the new provider on generated client APIs. |
| client/deployment/src/main/resources/templates/libraries/microprofile/pathParams.qute | Marks generated path params with @EncodedPathParam. |
| client/deployment/src/test/java/io/quarkiverse/openapi/generator/deployment/wrapper/OpenApiClientGeneratorWrapperTest.java | Adds generator-level test to confirm provider registration and annotation emission. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...java/io/quarkiverse/openapi/generator/providers/PathParamEncodingParamConverterProvider.java
Outdated
Show resolved
Hide resolved
...java/io/quarkiverse/openapi/generator/providers/PathParamEncodingParamConverterProvider.java
Outdated
Show resolved
Hide resolved
client/deployment/src/main/resources/templates/libraries/microprofile/pathParams.qute
Outdated
Show resolved
Hide resolved
...a/io/quarkiverse/openapi/generator/deployment/wrapper/OpenApiClientGeneratorWrapperTest.java
Outdated
Show resolved
Hide resolved
Contributor
|
🚀 PR Preview 41e7f27 has been successfully built and deployed to https://quarkiverse-openapi-generator-preview-pr-1516.surge.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Many thanks for submitting your Pull Request ❤️!
Please make sure that your PR meets the following requirements:
[0.9.x] SubjectHow to backport a pull request to a different branch?
In order to automatically create a backporting pull request please add one or more labels having the following format
backport-<branch-name>, where<branch-name>is the name of the branch where the pull request must be backported to (e.g.,backport-quarkus2to backport the original PR to thequarkus2branch).Once the original pull request is successfully merged, the automated action will create one backporting pull request per each label (with the previous format) that has been added.
If something goes wrong, the author will be notified and at this point a manual backporting is needed.